import React from 'react'
import "./style.less"

export default function Item ({ data }) {

  function clickCommentHandle () {
    console.log("评价");
  }
  return (
    <div className="order-item-container clear-fix">
      <div className="order-item-img float-left">
        <img src={data.img} alt="" />
      </div>
      <div className="order-item-comment float-right">
        {
          data.commentState === 0 ?
            <button className="btn" onClick={clickCommentHandle}>评价</button>
            :
            <button className="btn unseleted-btn">已评价</button>
        }
      </div>
      <div className="order-item-content">
        <span>商户：{data.title}</span>
        <span>类型：{data.houseType}</span>
        <span>价格：{data.price}</span>
      </div>
    </div>
  )
}
